<?php
class indexController extends Controller {       //控制器必须继承Controller类或其子类
    public function index(){               //默认Action
        $this->assign('content','变量渲染成功!');//分配变量
        $this->assign('var',true);
        $this->assign('colors',array('red','green','blue'));
        if(isset($_GET['var1'])) $this->assign('var1',$_GET['var1']);
        $this->display();                        //渲染
    }
    public function form(){
        $this->display();
    }
}